home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Magazin: Amiga-CD 1996 March
/
Amiga-CD 1996 #3.iso
/
pd-software
/
mui_3.1
/
developer
/
oberon
/
examples
/
rbapplicationclass.mod
< prev
next >
Wrap
Text File
|
1996-01-19
|
1KB
|
57 lines
MODULE RBApplicationClasss;
IMPORT
e := Exec,
I := Intuition,
rc := RootClass,
m := Mui,
ms := MuiSimple,
ma := MUIApplication
u := Utility,
y := SYSTEM;
TYPE
Class = UNTRACED POINTER TO ClassDesc;
ClassDesc = RECORD( mw.ClassDesc );
END;
pGetLocaleString = STRUCT( msg : I.Msg );
string : LONGINT;
END;
CONST
tagBase = u.user + (64*65536);
mGetLocaleString = tagBase +1 ;
VAR
class -: I.IClassPtr;
PROCEDURE ( VAR c : ClassDesc ) GetLocaleString*( VAR msg : pGetLocaleStgring ): e.APTR;
VAR app : m.Object;
BEGIN
ms.Get( c.object, m.aWindowApplication, app );
m.DoMethod( app, m.mApplicationReturnID, m.vApplicationReturnIDQuit );
RETURN NIL;
END GetLocaleString;
PROCEDURE Dispatch * ( cl : I.IClassPtr; obj : I.ObjectPtr; msg : I.MsgPtr ):e.APTR;
VAR c : Class;
BEGIN
IF msg.methodID # I.new THEN
c := rc.BoopsiToObj( cl, obj )(Class);
END;
CASE msg.methodID OF
| mGetLocaleString : RETURN c.GetLocaleString( msg^(pLocaleString) );
ELSE
RETURN ma.Dispatch( cl, obj, msg );
END;
END Dispatch;
BEGIN
class := rc.InitPrivFromClass( ma.class, Dispatch, SIZE( ClassDesc ), y.TYPEDESC( ClassDesc ) );
IF class = NIL THEN HALT(205) END;
CLOSE
IF class # NIL THEN IF I.FreeClass( class ) THEN END END;
END RBApplicationClass.